package com.ihr360.commons.model.type;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ihr360.commons.model.annotation.EnumData;
import com.ihr360.commons.serializer.jackson.EnumDataSerializer;

@EnumData
@JsonSerialize(using = EnumDataSerializer.class)
public enum BenefitsPayer {
    PERSON("个人"), COMPANY("公司");

    private String title;

    @JsonCreator
    public static BenefitsPayer factory(@JsonProperty(value = "id") String id) {
        return BenefitsPayer.valueOf(id);
    }


    BenefitsPayer(String title) {
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

}
